<html >
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.8.0.js">
    </script>
    <link type="text/css" rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jsgrid/1.5.3/jsgrid.min.css" />
    <link type="text/css" rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jsgrid/1.5.3/jsgrid-theme.min.css" />

    <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jsgrid/1.5.3/jsgrid.min.js"></script>
</head>

<body>


<h1>虚拟机系统监测</h1>
<div id="jsGrid"></div>
<script>
    htmlobj=$.ajax({url:"monitor/getSystemInfo",async:false});
    var clients=JSON.parse('['+htmlobj.responseText+']');



    $("#jsGrid").jsGrid({
        width: "100%",
        height: "400px",


        sorting: true,
        paging: true,

        data: clients,

        fields: [
            { name: "sysInfo", title:"操作系统",type: "text",  align: "center",width: 150 },
            { name: "ip", title:"IP地址",type: "text",  align: "center",width: 200},
            { name: "totalMemory", title:"总内存(GB)",type: "number",align: "right", width: 200 },
            { name: "freeMemory",title:"空余内存(GB)", text: "number",align: "right", width: 200 },
            { name: "freeRate",title:"空余内存(%)", type: "number", align: "right", width: 200 },
            { name: "cpuUseRate", title:"CPU使用率(%)",type: "number", align: "right", width: 200 },
            { name: "disk", title:"硬盘信息",type: "text", align: "left", width: 500 }

        ]
    });

</script>
</body>

</html>
